package org.example.petsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.example.petsystem.entity.Post;
import java.util.List;
import java.util.Map;

@Mapper
public interface PostMapper extends BaseMapper<Post> {
    //删除帖子
    int deletePost(Map<String,Object> map);
    //增加帖子
    int addPost(Map<String,Object> map);
    //查看单个帖子
    Map<String,Object> displayPost1(Map<String,Object> map);
    //搜索帖子
    List<Map<String,Object>> searchPost(Map<String,Object> map);
    //发送评论
    int sendComment(Map<String,Object> map);
    //查看评论
    List<Map<String,Object>> displayComment(Map<String,Object> map);
    //查看所有帖子
    List<Map<String,Object>> displayPost();
    // 获取用户帖子列表
    List<Map<String,Object>> getUserPosts(String phone);

    // 新增的帖子管理接口方法
    List<Map<String,Object>> getPostList();
    int approvePost(Integer postId);
    int rejectPost(Map<String,Object> params);
}
